package com.example.department.web.controller;

import com.example.department.model.DepartmentModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
@Api(tags = "部门接口", produces = "application/json")
public class DepartmentController {

    @Operation(summary = "用户列表", method = "GET")
    @GetMapping("/departments/list")
    public List<DepartmentModel> list() {
        return Arrays.asList(
                new DepartmentModel(1L, "admin", "hello"),
                new DepartmentModel(2L, "app", "world"));
    }


}
